package com.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;

import com.dao.LogDao;
import com.pojo.Logpojo;
import com.util.MybatisSessionFactory;

public class LogService {
	SqlSession session = MybatisSessionFactory.getSqlSession();
	LogDao c = session.getMapper(LogDao.class);
//添加
	public void addlog(@Param("user_id") String user_id,
			@Param("archive_id") String archive_id,
			@Param("operation") String operation) {
		c.addlog(user_id, archive_id, operation);
		session.commit();

	}
//查询全部
	public List<Logpojo> querylog(@Param("operation") String operation) {
		List<Logpojo> ren = c.querylog(operation);
		return ren;

	}
}
